{% extends 'host.html' %}
{% block content%}
{% block style %}
<style >
   .mynav{
     margin-bottom:0!important
   }


</style>



{% endblock%}

<header style="background:#EEEEEE; height:6rem;"> <div class="container"><h1>教师管理</h1></div></header><br>

<div class="container">
   <a href="/addteacher" type="button" class="btn btn-info glyphicon glyphicon-plus"  >  添加</a><br><br>
<table class="table table-bordered">
  <thead>
    <tr>
      <th class="text-center">名称</th>
      <th class="text-center">介绍</th>
      <th class="text-center">职称</th>
      <th class="text-center">编辑</th>
      <th class="text-center">删除</th>
    </tr>
  </thead>
  <tbody>

    <tr> 
    {% for  ac in user %}

      <td>{{ac.name}}</td>
      <td>{{ac.abstract|truncate(10,True)}}</td>
      <td>{{ac.level}}</td>
          <td><a class=" glyphicon glyphicon-edit" href="/teacadit/{{ac.id}}"></a></td>
        <!-- 传的变量要加引号 -->
      <td><a class=" glyphicon glyphicon-trash"  href="#"  onclick="teachermodal('{{ac.id }}','{{ac.name}}')"></a></td>

    </tr> 
     {% endfor %}
  </tbody>


</div>
 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">是否确认删除</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary  remove">确认删除</button>
            </div>
        </div>
    </div>
</div>



{% endblock %}
{% block script %}


<script type="text/javascript" src='/static/dele.js'></script>
{% endblock %}